import java.util.Scanner;

public class Day1 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int l = scanner.nextInt();
        int r = scanner.nextInt();
        int num = 0;

        for (int i = l; i < r; i++) {
            while(i != 0){
                if (i % 2 == 2){
                    num++;
                }
                i /= 2;
            }
        }
        System.out.println(num);
    }































}
